package com.blog.cloud.api.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.blog.cloud.api.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

import java.io.Serial;
import java.io.Serializable;

/**
 * 系统日志表(SysLog)表实体类
 *
 * @author 龙茶清欢
 * @since 2023-02-22 20:02:39
 */
@Getter
@Setter
@TableName("t_sys_log")
@Schema(name = "系统日志表实体", description = "系统日志表映射")
public class SysLog extends BaseEntity implements Serializable {
    @Serial
    private static final long serialVersionUID = 984353483418873071L;

    @TableId(value = "uid" , type = IdType.AUTO)
    @Schema(description = "唯一uid")
    private String uid;

    @TableField(value = "user_name")
    @Schema(description = "用户名")
    private String userName;
    
    @TableField(value = "admin_uid")
    @Schema(description = "管理员uid")
    private String adminUid;
    
    @TableField(value = "ip")
    @Schema(description = "请求ip地址")
    private String ip;
    
    @TableField(value = "url")
    @Schema(description = "请求url")
    private String url;
    
    @TableField(value = "type")
    @Schema(description = "请求方式")
    private String type;
    
    @TableField(value = "class_path")
    @Schema(description = "请求类路径")
    private String classPath;
    
    @TableField(value = "method")
    @Schema(description = "请求方法名")
    private String method;
    
    @TableField(value = "params")
    @Schema(description = "请求参数")
    private String params;
    
    @TableField(value = "operation")
    @Schema(description = "描述")
    private String operation;
    
    @TableField(value = "status")
    @Schema(description = "状态")
    private Integer status;
    
    @TableField(value = "ip_source")
    @Schema(description = "ip来源")
    private String ipSource;
    
    @TableField(value = "spend_time")
    @Schema(description = "方法请求花费的时间")
    private Integer spendTime;
}

